



import javax.swing.JOptionPane;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MenuPrincipal.java
 *
 * Created on 23/01/2012, 12:53:48 AM
 */
/**
 *
 * @author JOSE LUIS
 */
public class MenuPrincipal extends javax.swing.JFrame {
 
    /** Creates new form MenuPrincipal */
    public MenuPrincipal() {
        super("Nombre del Programa");
        initComponents();
       
       
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPopupMenu1 = new javax.swing.JPopupMenu();
        jPopupMenu2 = new javax.swing.JPopupMenu();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu3 = new javax.swing.JMenu();
        jMenu4 = new javax.swing.JMenu();
        jDialog1 = new javax.swing.JDialog();
        jFrame1 = new javax.swing.JFrame();
        jFrame2 = new javax.swing.JFrame();
        jDesktopPane1 = new javax.swing.JDesktopPane();
        menuarriba = new javax.swing.JMenuBar();
        op1 = new javax.swing.JMenu();
        jMenu5 = new javax.swing.JMenu();
        detallesemplesado = new javax.swing.JMenuItem();
        jMenu7 = new javax.swing.JMenu();
        jMenu8 = new javax.swing.JMenu();
        jMenu9 = new javax.swing.JMenu();
        jMenu10 = new javax.swing.JMenu();
        jMenu11 = new javax.swing.JMenu();
        op3 = new javax.swing.JMenu();
        jMenu12 = new javax.swing.JMenu();
        detallesprovedores = new javax.swing.JMenuItem();
        jMenu14 = new javax.swing.JMenu();
        jMenu15 = new javax.swing.JMenu();
        jMenu16 = new javax.swing.JMenu();
        jMenu17 = new javax.swing.JMenu();
        jMenu1 = new javax.swing.JMenu();
        jMenu18 = new javax.swing.JMenu();
        jMenu19 = new javax.swing.JMenu();
        About = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();

        jMenu3.setText("File");
        jMenuBar2.add(jMenu3);

        jMenu4.setText("Edit");
        jMenuBar2.add(jMenu4);

        javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
        jDialog1.getContentPane().setLayout(jDialog1Layout);
        jDialog1Layout.setHorizontalGroup(
            jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jDialog1Layout.setVerticalGroup(
            jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
        jFrame1.getContentPane().setLayout(jFrame1Layout);
        jFrame1Layout.setHorizontalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame1Layout.setVerticalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jFrame2Layout = new javax.swing.GroupLayout(jFrame2.getContentPane());
        jFrame2.getContentPane().setLayout(jFrame2Layout);
        jFrame2Layout.setHorizontalGroup(
            jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame2Layout.setVerticalGroup(
            jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("principal"); // NOI18N

        menuarriba.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        menuarriba.setEnabled(false);
        menuarriba.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
        menuarriba.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                menuarribaComponentShown(evt);
            }
        });

        op1.setText("Empresa");
        op1.setComponentPopupMenu(jPopupMenu1);

        jMenu5.setText("Empleados");

        detallesemplesado.setText("Detalles");
        detallesemplesado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                detallesemplesadoActionPerformed(evt);
            }
        });
        jMenu5.add(detallesemplesado);

        jMenu7.setText("Lista");
        jMenu5.add(jMenu7);

        op1.add(jMenu5);

        jMenu8.setText("Informes");

        jMenu9.setText("Facturas");
        jMenu8.add(jMenu9);

        jMenu10.setText("Informes Ventas");
        jMenu8.add(jMenu10);

        jMenu11.setText("Materia Prima");
        jMenu8.add(jMenu11);

        op1.add(jMenu8);

        menuarriba.add(op1);

        op3.setText("Compras");

        jMenu12.setText("Proveedores");

        detallesprovedores.setText("Detalles");
        detallesprovedores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                detallesprovedoresActionPerformed(evt);
            }
        });
        jMenu12.add(detallesprovedores);

        jMenu14.setText("Lista");
        jMenu12.add(jMenu14);

        op3.add(jMenu12);

        jMenu15.setText("Facturas");

        jMenu16.setText("Ingreso");
        jMenu15.add(jMenu16);

        jMenu17.setText("Detalles");
        jMenu15.add(jMenu17);

        op3.add(jMenu15);

        menuarriba.add(op3);

        jMenu1.setText("Ventas");

        jMenu18.setText("Pedidos");
        jMenu1.add(jMenu18);

        jMenu19.setText("Clientes");
        jMenu1.add(jMenu19);

        menuarriba.add(jMenu1);

        About.setText("About");
        About.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                AboutMouseClicked(evt);
            }
        });
        About.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AboutActionPerformed(evt);
            }
        });
        menuarriba.add(About);

        jMenu2.setText("Salir");
        menuarriba.add(jMenu2);

        setJMenuBar(menuarriba);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1233, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void AboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AboutActionPerformed
// TODO add your handling code here:
     
}//GEN-LAST:event_AboutActionPerformed

private void AboutMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_AboutMouseClicked
// TODO add your handling code here:
   
}//GEN-LAST:event_AboutMouseClicked

    private void detallesemplesadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_detallesemplesadoActionPerformed
        // TODO add your handling code here:
        nuevoempleado emp = new nuevoempleado();
        // se añade al jDesktopPane
        jDesktopPane1.add(emp);
        //se muestra en pantalla
        emp.show(); //
    }//GEN-LAST:event_detallesemplesadoActionPerformed

    
   
   
    private void menuarribaComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_menuarribaComponentShown
        // TODO add your handling code here:
       
    }//GEN-LAST:event_menuarribaComponentShown

    private void detallesprovedoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_detallesprovedoresActionPerformed
        // TODO add your handling code here:
   Proveedor1 prov = new Proveedor1();
        // se añade al jDesktopPane
        jDesktopPane1.add(prov);
        //se muestra en pantalla
        prov.show();
            
    }//GEN-LAST:event_detallesprovedoresActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MenuPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MenuPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MenuPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MenuPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                MenuPrincipal principal=new MenuPrincipal();
               principal.setExtendedState(MenuPrincipal.MAXIMIZED_BOTH);
               
                principal.setVisible(true);
              
                 
               
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu About;
    private javax.swing.JMenuItem detallesemplesado;
    private javax.swing.JMenuItem detallesprovedores;
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JFrame jFrame1;
    private javax.swing.JFrame jFrame2;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu10;
    private javax.swing.JMenu jMenu11;
    private javax.swing.JMenu jMenu12;
    private javax.swing.JMenu jMenu14;
    private javax.swing.JMenu jMenu15;
    private javax.swing.JMenu jMenu16;
    private javax.swing.JMenu jMenu17;
    private javax.swing.JMenu jMenu18;
    private javax.swing.JMenu jMenu19;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenu jMenu8;
    private javax.swing.JMenu jMenu9;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JPopupMenu jPopupMenu1;
    private javax.swing.JPopupMenu jPopupMenu2;
    private javax.swing.JMenuBar menuarriba;
    private javax.swing.JMenu op1;
    private javax.swing.JMenu op3;
    // End of variables declaration//GEN-END:variables
}
